package cn.ztuo.bitrade.service;
import cn.ztuo.bitrade.dao.SysCfDao;
import cn.ztuo.bitrade.entity.SysCf;
import cn.ztuo.bitrade.service.Base.BaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Slf4j
@Service
public class SysCfService extends BaseService {

    @Autowired
    private SysCfDao SysCfDao;

    /**
     * 获取单个配置的名称和值
     * @param name
     * @return
     */
    public SysCf configOneCname(String name){
        return SysCfDao.findByCname(name);
    }

    public List<SysCf> configAll(){
        return SysCfDao.findAll();
    }

    public SysCf save(SysCf info){
        return SysCfDao.save(info);
    }

}
